import request from '@/utils/request'
//上传帮助文档
export const UploadHelperDoc = (parmas) => {
  return request({
    url: '/attachment/UploadHelpDocumentTask',
    headers: {
      isNeedFixParmas: false,
      'Content-Type': 'multipart/form-data',
    },
    method: 'post',
    data: parmas,
  })
}
//获取帮助文档
export const GetHelperDocList = (parmas) => {
  return request({
    url: '/attachment/GetHelpFileList',
    headers: {
      isNeedFixParmas: true,
    },
    method: 'post',
    data: parmas,
  })
}

export const GetHelperDocDetail = ({ systemId, fileName }) => {
  return request({
    url: `/attachment/helpFile/${systemId}/${encodeURIComponent(fileName)}`,
    headers: {
      isNeedFixParmas: true,
    },
    method: 'get',
    responseType: 'blob',
  })
}
